import React from 'react'
import { Button } from 'antd'
import NewsPublish from '@components/SandBox/Publish/NewsPublish'
import usePublish from '@components/SandBox/Publish/usePublish'

export default function Sunset() {
  // 自定义hook
  const { dataSource, handleSunset } = usePublish(2)

  return (
    <div>
      <NewsPublish dataSource={dataSource} button={(id) => <Button danger onClick={() => handleSunset(id)}> 下线 </Button>} /> 
    </div>
  )
}
